

If ProcessExists("Rogue Tools.exe") Then
	$f = 0
Else
	MsgBox(4096, "Rogue Tools?", "You need to be running Rogue Tools in order to use this control")
	Exit
EndIf
$mac2l = GUICreate("Macrobar", 527, 84, 0, -1, -1, $WS_EX_TOPMOST)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $mac2l, "int", 500, "long", 0x00080000)
$lock = GUICtrlCreateLabel("", 455, 0, 70, 84)
GUICtrlSetTip(-1, "Lock The Macro Bar Into Place")
GUICtrlCreatePic(@ProgramFilesDir & "\Burnersware\Rogue Tools\Include\img\mac2l.bmp", 0, 0, 527, 84)
GUISetState()
GUISetState(@SW_HIDE, $mac2l)
GUISetState(@SW_SHOW, $mac2l)
WinActivate("FFXiApp-Windower Enabled")
While 1
	$Message = GUIGetMsg()
	If $Message = $GUI_EVENT_CLOSE Then
		DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $mac2l, "int", 1000, "long", 0x00090000)
		Exit
	EndIf
	If $Message = $lock Then
		lock()
	EndIf
WEnd

Func lock()
	$size = WinGetPos("Macrobar")
	GUISetState(@SW_HIDE, $mac2l)
	$size = WinGetPos("Macrobar")
	$mac2 = GUICreate("Rogue Tools", 527, 84, $size[0], $size[1], $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW)
	$c1 = GUICtrlCreateLabel("", 5, 0, 42, 42)
	$c2 = GUICtrlCreateLabel("", 52, 0, 42, 42)
	$c3 = GUICtrlCreateLabel("", 99, 0, 42, 42)
	$c4 = GUICtrlCreateLabel("", 146, 0, 42, 42)
	$c5 = GUICtrlCreateLabel("", 195, 0, 42, 42)
	$c6 = GUICtrlCreateLabel("", 243, 0, 42, 42)
	$c7 = GUICtrlCreateLabel("", 291, 0, 42, 42)
	$c8 = GUICtrlCreateLabel("", 340, 0, 42, 42)
	$c9 = GUICtrlCreateLabel("", 387, 0, 42, 42)
	$c0 = GUICtrlCreateLabel("", 435, 0, 42, 42)
	$a1 = GUICtrlCreateLabel("", 5, 42, 42, 42)
	$a2 = GUICtrlCreateLabel("", 52, 42, 42, 42)
	$a3 = GUICtrlCreateLabel("", 99, 42, 42, 42)
	$a4 = GUICtrlCreateLabel("", 146, 42, 42, 42)
	$a5 = GUICtrlCreateLabel("", 195, 42, 42, 42)
	$a6 = GUICtrlCreateLabel("", 243, 42, 42, 42)
	$a7 = GUICtrlCreateLabel("", 291, 42, 42, 42)
	$a8 = GUICtrlCreateLabel("", 340, 42, 42, 42)
	$a9 = GUICtrlCreateLabel("", 387, 42, 42, 42)
	$a0 = GUICtrlCreateLabel("", 435, 42, 42, 42)
	$move = GUICtrlCreateLabel("MOVE", 482, 0, 42, 84)
	GUICtrlSetTip(-1, "Unlocks the macrobar so you can move it")
	GUICtrlSetTip(-1, "Unlocks the macrobar so you can move it")
	GUICtrlCreatePic(@ProgramFilesDir & "\Burnersware\Rogue Tools\Include\img\mac2.bmp", 0, 0, 527, 84)
	GUISetState()
	AutoItSetOption("SendKeydownDelay", 250)
	WinActivate("FFXiApp-Windower Enabled")
	Do
		$Message = GUIGetMsg()
		If $Message = $GUI_EVENT_CLOSE Then
			DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $mac2l, "int", 1000, "long", 0x00090000)
			Exit
		EndIf
		If $Message = $a1 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("!1")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $a2 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("!2")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $a3 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("!3")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $a4 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("!4")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $a5 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("!5")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $a6 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("!6")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $a7 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("!7")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $a8 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("!8")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $a9 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("!9")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $a0 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("!0")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $c1 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("^1")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $c2 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("^2")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $c3 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("^3")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $c4 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("^4")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $c5 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("^5")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $c6 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("^6")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $c7 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("^7")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $c8 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("^8")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $c9 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("^9")
			MouseMove($mm[0], $mm[1])
		EndIf
		If $Message = $c0 Then
			$mm = MouseGetPos()
			WinActivate("FFXiApp-Windower Enabled")
			Send("^0")
			MouseMove($mm[0], $mm[1])
		EndIf
	Until $Message = $move
	GUISetState(@SW_HIDE, $mac2)
	GUISetState(@SW_SHOW, $mac2l)
	WinActivate("FFXiApp-Windower Enabled")
EndFunc ;==>lock

